/***************************************************************************
 *   Copyright (C) 2008 by Philipp Müller                                  *
 *   philipp.mueller@gmx.de                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA          *
 ***************************************************************************/

#ifndef RECORDINGSWIDGETITEM_H
#define RECORDINGSWIDGETITEM_H

#include <QTreeWidgetItem>
#include <QDateTime>

enum RecordingEntryType
{
    /* Just the possible types of the files */
    REC_TYPE_FILE = 1,
    REC_TYPE_DIR = 2
};


/**
 @author Philipp Müller <philipp.mueller@gmx.de>
*/

class RecordingsWidgetItem : public QTreeWidgetItem
{

    public:
        RecordingsWidgetItem( QTreeWidget * tree ) : QTreeWidgetItem( tree ) {}

        RecordingsWidgetItem( QTreeWidget * parent, const QStringList & strings ) : QTreeWidgetItem( parent, strings ) {}

        RecordingsWidgetItem( QTreeWidgetItem * parentItem, const QStringList & strings )
                : QTreeWidgetItem( parentItem, strings ) {}

        bool operator < ( const QTreeWidgetItem & other ) const;

        QString entryName() const;
        void setEntryName( const QString& name );

        QString path() const;
        void setPath( const QString& path );

        QDateTime start() const;
        void setStart( QDateTime& start );

        int entryType() const;
        void setEntryType( int type );

    private:
        QDateTime m_start;
        QString m_name;
        QString m_path;

        int m_type;
};

#endif
